home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 023a / advsrc.zip / ADVEMAP.FOR < prev    next >
Text File  |  1993-04-08  |  2KB  |  73 lines

  1. C  Adventure Map Maker
  2. c   Written for MS DOS PDS FORTRAN v5.10 
  3. c    by Paul Muñoz-Colman, FunStuff Software
  4. c   27 Mar 1993  
  5. c   12 August 1985
  6. C
  7. $NODEBUG
  8. $notstrict
  9. $storage: 4
  10.     implicit integer*4 (a-z)
  11.     character*72 loc(140)
  12.     character*4 vocab(100),name1,out(9),blank
  13.     dimension travel(750,11)
  14.     character*72 short
  15.     data blank/' '/
  16.         open (1,file='advedat.asc')
  17.     read(1,10)sect
  18. 10    format (i4)
  19. 11    format (1x,i4)
  20.     oldnum=0
  21. c
  22. c  read long description section--save first lines only
  23. 20    read (1,21) number, short
  24. 21    format(i4,a72)
  25.     if(number.eq.-1)goto 30
  26.     if (oldnum.eq.number) go to 20
  27.     oldnum = number
  28.     loc(number)=short
  29.     goto 20
  30. c
  31. c   read short descriptions--overlay long description first lines
  32. 30    read(1,10)sect
  33. 32    read(1,35)number,short
  34. 35    format(i4,a72)
  35. 36    format(1x,i4,a72)
  36.     if(number.eq.-1)goto 50
  37. 40     loc(number)=short
  38.     goto 32
  39. c
  40. c    read travel numbers
  41. 50    read(1,10)sect
  42.     i=0
  43. 60    i=I+1
  44.     read(1,70)(travel(i,j),j=1,11)
  45. 70    format(i4,10i7,i6)
  46.     if(travel(i,1).ne.-1)goto 60
  47. c
  48. c    read vocabulary
  49.     read(1,10)sect
  50. 80    read(1,90)number,name1
  51. 90    format(i4,a4)
  52.     if(number.gt.999)goto 100
  53.     vocab(number)=name1
  54.     goto 80
  55. c
  56. c   now put it all together
  57. 100    curmsg=0
  58.     do 150    i=1,750
  59.     if(travel(i,1).eq.-1)goto 170
  60.     if(travel(i,1).eq.curmsg)goto 120
  61.     curmsg=travel(i,1)
  62.     write(*,110)curmsg,loc(curmsg)
  63. 110    format(//1x,i4,2x,a72)
  64. 120    do 130 k=1,9
  65. 130    out(k)=blank
  66.     do 140 l=3,11
  67.     if(travel(i,l).eq.0)goto 150
  68. 140    out(l-2)=vocab(travel(i,l))
  69. 150    write(*,160)travel(i,2),out
  70. 160    format(1x,i7,9(2x,a4))
  71. 170    stop
  72.     end
  73.